home *** CD-ROM | disk | FTP | other *** search
- Option Explicit
-
- ' ---------------------------
- ' SubEZ function declarations
- ' ---------------------------
- ' LoWord extracts low integer from long lParam in message
- ' capture. HiWord extracts high integer. MakeLong makes
- ' long value by concatenating two integers. This stuff is
- ' easy enough to do w/o calls to functions, but used
- ' because it's there.
- Declare Function LoWord Lib "SUBEZD.VBX" (ByVal dWord As Long) As Integer
- Declare Function HiWord Lib "SUBEZD.VBX" (ByVal dWord As Long) As Integer
- Declare Function MakeLong Lib "SUBEZD.VBX" (ByVal LoWord As Integer, ByVal HiWord As Integer) As Long
-
- ' ---------------------------------------------
- ' Windows API system menu function declarations
- ' ---------------------------------------------
- Declare Function GetSystemMenu Lib "User" (ByVal hWnd As Integer, ByVal bRevert As Integer) As Integer
- Declare Function RemoveMenu Lib "User" (ByVal hMenu As Integer, ByVal nPosition As Integer, ByVal wFlags As Integer) As Integer
-
- ' -----------------------------
- ' Windows API message constants
- ' -----------------------------
- Global Const WM_SETCURSOR = &H20 ' cursor movement message
- Global Const WM_LBUTTONDOWN = &H201 ' left button message
- Global Const HTCLIENT = 1 ' hit-code: form
- Global Const HTLEFT = 10 ' hit-code: left border
- Global Const HTBOTTOMRIGHT = 17 ' hit code: bottom right border
-
- Sub NoSizeMenu (FormToDo As Integer)
-
- Dim hSysMenu As Integer
- Dim discard As Integer
-
- ' make editable copy of system menu
- hSysMenu = GetSystemMenu(FormToDo, False)
-
- ' delete Size command from system menu
- discard = RemoveMenu(hSysMenu, 2, &H400)
-
- End Sub
-
-